Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMP] Check call order of paddle.amp.decorate and paddle.DataParallel #38785

Merged

Conversation

zhangbo9674
Copy link
Contributor

@zhangbo9674 zhangbo9674 commented Jan 7, 2022

PR types

Performance optimization

PR changes

APIs

Describe

对于使用amp-o2的分布式训练,要求paddle.amp.decorate需要在paddle.DataParallel初始化分布式训练的网络前。

paddle.amp.decorate接口添加对上述逻辑的检查。如果调用顺序有错,将报出如下RuntimeError

For distributed AMP training, you should first use paddle.amp.decorate() to decotate origin model, and then call paddle.DataParallel get distributed model.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 7, 2022

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

zhiqiu
zhiqiu previously approved these changes Jan 7, 2022
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ForFishes
ForFishes previously approved these changes Jan 7, 2022
Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangbo9674 zhangbo9674 dismissed stale reviews from ForFishes and zhiqiu via ca208b3 January 7, 2022 06:55
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangbo9674 zhangbo9674 merged commit fbb4028 into PaddlePaddle:develop Jan 11, 2022
@zhangbo9674 zhangbo9674 deleted the dev/check_amp_distributed branch March 2, 2023 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants